——————————————————————Open and Close Stack handlers—————————————————————
on startUp
getHomeInfo
set userlevel to 5
end startUp
on openStack
if the version < 1.2 then
answer "Denna bunt kräver HyperCard version 1.2."
set lockMessages to TRUE
go home
else
global userHold,findNextList,pushList
lock screen
put the userLevel into userHold
set userLevel to 5
put empty into findNextList
put 0 into pushList
set loc of msg to 19,285
unlock screen
end if
end openStack
on closeStack
global cardName,lastFind,userHold,findNext
set userLevel to userHold
--put empty into global vars used by this stack to release space:
put empty into cardName
put empty into lastFind
put empty into userHold
put empty into findNext
resetStack
set lockMessages to FALSE
end closeStack
on doMenu command
if command is "first" or command is "next" or command is "prev" or command is "last" or command is "back" or command is "find..." then
--function kwote takes a string as its argument and returns the
--quoted version it (that is, with "" wrapped around it)
function kwote string
return quote & string & quote
end kwote
--function clickLine returns the line of the target field
--over which the mouse was clicked. It allows 4 pixels under the
--baseline for the psychological effect of descenders.
function clickLine
return ((the mouseV - item 2 of the rect of the target-4) div the textheight of the target) + 1
end clickLine
—————————————————————————*** End of File ***————————————————————————————